package UIPanels;

import java.awt.Color;
import java.awt.Font;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSeparator;
import javax.swing.JTextArea;

import org.dyno.visual.swing.layouts.Bilateral;
import org.dyno.visual.swing.layouts.Constraints;
import org.dyno.visual.swing.layouts.GroupLayout;
import org.dyno.visual.swing.layouts.Leading;

//VS4E -- DO NOT REMOVE THIS LINE!
//public class MainPanel extends JPanel
/**
 * this panel supply ui for executing all system functions. 
 * @author Daniel
 */
public class MainPanel extends GeneralPanel
{
	private static final long serialVersionUID = 1L;
	private JLabel jLabel1;
	private JLabel jLabel0;
	private JSeparator jSeparator0;
	private JButton jButton0;
	private JButton jButton1;
	private JButton jButton2;
	private JLabel jLabel2;
	private JSeparator jSeparator1;
	private JButton jButton3;
	private JButton jButton4;
	private JButton jButton5;
	private JButton jButton6;
	private JButton jButton7;
	private JTextArea jTextArea0;
	private JScrollPane jScrollPane0;
	private JLabel jLabel3;

	/**
	 * Constructor for local panel with no parameters.
	 */
	public MainPanel()
	{
		initComponents();
	}

	/**
	 * this function initiate all components at the panel.sets initial values and locating them on the
	 * panel 
	 */
	private void initComponents() {
		setLayout(new GroupLayout());
		add(getJSeparator0(), new Constraints(new Bilateral(0, 0, 320), new Leading(81, 10, 12, 12)));
		add(getNorthButton(), new Constraints(new Leading(151, 256, 12, 12), new Leading(130, 43, 12, 12)));
		add(getCenterButton(), new Constraints(new Leading(151, 256, 12, 12), new Leading(188, 43, 12, 12)));
		add(getSouthButton(), new Constraints(new Leading(151, 256, 12, 12), new Leading(241, 43, 12, 12)));
		add(getJLabel0(), new Constraints(new Leading(146, 276, 12, 12), new Leading(7, 10, 10)));
		add(getJLabel1(), new Constraints(new Leading(205, 148, 12, 12), new Leading(57, 10, 10)));
		add(getJLabel2(), new Constraints(new Bilateral(83, 82, 391), new Leading(93, 10, 10)));
		add(getJSeparator1(), new Constraints(new Bilateral(-1, -2, 587), new Leading(349, 10, 10, 10)));
		add(getUpdateButton(), new Constraints(new Leading(10, 171, 10, 10), new Leading(365, 64, 10, 10)));
		add(getHistoryButton(), new Constraints(new Leading(199, 171, 12, 12), new Leading(365, 64, 10, 10)));
		add(getLogoutButton(), new Constraints(new Leading(376, 171, 12, 12), new Leading(365, 64, 10, 10)));
		add(getGroupCouponsButton(), new Constraints(new Leading(151, 256, 12, 12), new Leading(296, 41, 12, 12)));
		add(getJScrollPane0(), new Constraints(new Leading(92, 393, 10, 10), new Leading(492, 38, 10, 10)));
		add(getJLabel3(), new Constraints(new Leading(165, 12, 12), new Leading(450, 10, 10)));
		setSize(584, 575);
	}

	private JLabel getJLabel3() {
		if (jLabel3 == null) {
			jLabel3 = new JLabel();
			jLabel3.setFont(new Font("Dialog", Font.BOLD, 24));
			jLabel3.setForeground(new Color(0, 128, 255));
			jLabel3.setText("Commercial Section");
		}
		return jLabel3;
	}

	private JScrollPane getJScrollPane0() {
		if (jScrollPane0 == null) {
			jScrollPane0 = new JScrollPane();
			jScrollPane0.setBackground(Color.lightGray);
			jScrollPane0.setViewportView(getJTextArea0());
		}
		return jScrollPane0;
	}

	public JTextArea getJTextArea0() {
		if (jTextArea0 == null) {
			jTextArea0 = new JTextArea();
			jTextArea0.setBackground(Color.lightGray);
			jTextArea0.setAutoscrolls(false);
			jTextArea0.setSelectedTextColor(new Color(128, 128, 255));
		}
		return jTextArea0;
	}

	public JButton getGroupCouponsButton() {
		if (jButton7 == null) {
			jButton7 = new JButton();
			jButton7.setText("Group Coupons");
		}
		return jButton7;
	}

	public JButton getLogoutButton() {
		if (jButton6 == null) {
			jButton6 = new JButton();
			jButton6.setText("Logout");
		}
		return jButton6;
	}

	private JLabel getJLabel0() {
		if (jLabel0 == null) {
			jLabel0 = new JLabel();
			jLabel0.setFont(new Font("Lucida Handwriting", Font.BOLD, 36));
			jLabel0.setForeground(new Color(0, 128, 255));
			jLabel0.setText("CoupMaster");
		}
		return jLabel0;
	}

	public JButton getHistoryButton() {
		if (jButton4 == null) {
			jButton4 = new JButton();
			jButton4.setText("Show Parchuse History ");
		}
		return jButton4;
	}

	public JButton getUpdateButton() {
		if (jButton3 == null) {
			jButton3 = new JButton();
			jButton3.setText("Update User Details");
		}
		return jButton3;
	}

	private JSeparator getJSeparator1() {
		if (jSeparator1 == null) {
			jSeparator1 = new JSeparator();
		}
		return jSeparator1;
	}

	private JLabel getJLabel2() {
		if (jLabel2 == null) {
			jLabel2 = new JLabel();
			jLabel2.setFont(new Font("Dialog", Font.BOLD, 16));
			jLabel2.setForeground(new Color(0, 128, 255));
			jLabel2.setText("Please Choose Coupon Area From The List Bellow:");
		}
		return jLabel2;
	}

	private JLabel getJLabel1() {
		if (jLabel1 == null) {
			jLabel1 = new JLabel();
			jLabel1.setFont(new Font("Dialog", Font.BOLD, 14));
			jLabel1.setForeground(new Color(0, 128, 255));
			jLabel1.setText("Save Your Budget");
		}
		return jLabel1;
	}

	public JButton getSouthButton() {
		if (jButton2 == null) {
			jButton2 = new JButton();
			jButton2.setText("South");
		}
		return jButton2;
	}

	public JButton getCenterButton() {
		if (jButton1 == null) {
			jButton1 = new JButton();
			jButton1.setText("Center");
		}
		return jButton1;
	}

	public JButton getNorthButton() {
		if (jButton0 == null) {
			jButton0 = new JButton();
			jButton0.setText("North");
		}
		return jButton0;
	}

	private JSeparator getJSeparator0() {
		if (jSeparator0 == null) {
			jSeparator0 = new JSeparator();
		}
		return jSeparator0;
	}

}
